﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WaterRevenueMS.Domain.Common.Models;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;


namespace WaterRevenueMS.Domain.ViewModels.BasicSet.AdditionItem
{
    public class AdditionItemModel : EntityCommon
    {
        public AdditionItemModel()
        {
            Search = new SearchModel();
            {
                Yong_SLX_NoItems = new List<SelectListItem>() {
                new SelectListItem { Text = "--- 用水性质 ---", Value = "0"}, 
                };
            };
        }

        public int Id { get; set; }


        [Display(Name = "用水类型")]
        public string Yong_SLX_Name { get; set; }
        public List<SelectListItem> Yong_SLX_NoItems { get; set; }

        [Display(Name = "用水类型")]
        public int? Yong_SLX_No { get; set; }

        [Display(Name = "附加项目")]
        public string Fu_JXM { get; set; }

        [Display(Name = "附加单价")]
        public float Fu_JFDJ { get; set; }

        [Display(Name = "排序序号")]
        [RegularExpression(@"\d+", ErrorMessage = "必须是数字")]
        public int OrderNo { get; set; }

        public SearchModel Search { get; set; }
    }
    public class SearchModel
    {
        public SearchModel()
        {
            Yong_SLX_NoItems = new List<SelectListItem>() {
                new SelectListItem { Text = "--- 用水性质 ---", Value = "0"}, 
                };
        }


        [Display(Name = "用水类型代码")]
        public string Yong_SLX_Name { get; set; }

        public List<SelectListItem> Yong_SLX_NoItems { get; set; }

        [Display(Name = "用水类型")]
        public int Yong_SLX_No { get; set; }

        [Display(Name = "附加项目")]
        public string Fu_JXM { get; set; }

        [Display(Name = "附加单价")]
        public float Fu_JFDJ { get; set; }

        [Display(Name = "排序序号")]
        public int OrderNo { get; set; }
    }
   
}
